package com.jwthhealth_pub.wristband.presenter;

import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;

import com.jwthhealth_pub.wristband.service.model.BloodHeartPastModule;
import com.jwthhealth_pub.wristband.service.model.SleepTimeModule;
import com.jwthhealth_pub.wristband.service.model.StepPassDataModule;

import java.util.ArrayList;
import java.util.List;

/**
 * 蓝牙 手环 操作
 * Created by liuzhen on 2017/12/16.
 */

public interface IWristBandServicePresenter {
    interface view {
    }

    interface presenter{
        void enableBlutTooth();

        void sendServiceBrocast(int type);

        void sendServiceBrocast(int type, int value);

        void sendServiceBrocast(int type, byte[] values);

        void sendServiceBrocast(int type, int[] values);

        void scan();

        void cancelScan();

        void connect(BluetoothDevice bluetoothDevice, BluetoothGattCallback mGattCallback);

        void setGatt(BluetoothGatt mConnGatt);

        boolean isConnected(String mSerial);

        void correctTime();

        void readStep();

        void notifyStep();

        void notifyHeart();

        void startHeart();

        void notifyBlood();

        void startBlood();

        int calcStep(byte[] value);

        List<List<Byte>> dataReconstitution(List<byte[]> value);

        void readPassStepAndSleep();

        void getPassStaticHeart();

        void notifyFatigue();

        void readFatifue();

        void writeUserinfo();

        void readwristBandInfo(int type);

        void postWristBandInfo(String mManufacturer, String mModel, String mSerial, String mHardware, String mSoftware);

        void postStepAndSleepData(List<SleepTimeModule> sleeps, List<StepPassDataModule> steps);

        void postBloodAndHeartData(ArrayList<BloodHeartPastModule> bloodHeartPastModules);
    }
}
